<template>
  <view :htmlObj="htmlObj" :change:htmlObj="parser.start"></view>
</template>

<script lang="unis" module="parser" src="./parser.unis"></script>

<script>
  export default {
    name: 'unisHtml2json',
    props: {
      htmlString: {
        type: String,
        default: ''
      },
      htmlRoot: {
        type: String,
        default: ''
      },
      pattern: {
        type: Array,
        default: []
      }
    },
    data() {
      return {
        trigger: true
      }
    },
    computed: {
      htmlObj() {
        return {
          htmlString:this.htmlString,
          htmlRoot: this.htmlRoot,
          pattern: this.pattern
        }
      }
    },
    methods: {
      getResult(res) {
        this.$emit('getResult', res)
      }
    }
  }
</script>

<style>
</style>
